import 'package:flutter/material.dart';

import 'package:fluro/fluro.dart';
import 'package:flutter_routes_demo/pages/aboutPage.dart';
import 'package:flutter_routes_demo/pages/homePage.dart';
import 'package:flutter_routes_demo/pages/splashPage.dart';

void main() {
  Router router = Router();

  router.define('splash', handler:
      Handler(handlerFunc: (BuildContext context, Map<String, dynamic> params) {
    return SplashPage();
  }));

  router.define('home', handler:
      Handler(handlerFunc: (BuildContext context, Map<String, dynamic> params) {
    return HomePage();
  }));

  router.define('about', handler:
      Handler(handlerFunc: (BuildContext context, Map<String, dynamic> params) {
    return AboutPage();
  }));

  runApp(MaterialApp(
    title: 'App',
    home: SplashPage(),
    onGenerateRoute: router.generator,
  ));
}
